package com.google.code.nexttraffic.web.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.google.code.nexttraffic.web.model.base.BaseObject;


/**
 * @author ParkHaeCheol
 * 
 */
public class Fare extends BaseObject {

	private static final long serialVersionUID = 1L;
	
	
	private Integer fareId;
	
	private Integer timeTableId;
	
	private String division;
	
	private String grade;
	
	private String fare;

	@Override
	public boolean equals(Object o) {

		if (o instanceof Fare == false) {
			return false;
		}

		if (this == o) {
			return true;
		}

		Fare rhs = (Fare) o;

		EqualsBuilder equb = new EqualsBuilder();
		equb.append(fareId, rhs.getFare());
		equb.append(timeTableId, rhs.getTimeTableId());

		return equb.isEquals();
	}

	@Override
	public int hashCode() {

		HashCodeBuilder hashcode = new HashCodeBuilder(3, 37);
		hashcode.append(fareId);
		hashcode.append(timeTableId);

		return hashcode.toHashCode();
	}

	@Override
	public String toString() {

		ToStringBuilder tob = new ToStringBuilder(this,
				ToStringStyle.MULTI_LINE_STYLE);

		tob.append("fareId", fareId);
		tob.append("timeTableId", timeTableId);
		tob.append("division", division);
		tob.append("grade", grade);
		tob.append("fare", fare);

		return tob.toString();

	}

	public Integer getFareId() {
		return fareId;
	}

	public void setFareId(Integer fareId) {
		this.fareId = fareId;
	}

	public Integer getTimeTableId() {
		return timeTableId;
	}

	public void setTimeTableId(Integer timeTableId) {
		this.timeTableId = timeTableId;
	}

	public String getDivision() {
		return division;
	}

	public void setDivision(String division) {
		this.division = division;
	}

	public String getGrade() {
		return grade;
	}

	public void setGrade(String grade) {
		this.grade = grade;
	}

	public String getFare() {
		return fare;
	}

	public void setFare(String fare) {
		this.fare = fare;
	}


}
